package com.javafour;

import java.util.Arrays;

public class Demo4 {
    public static void main(String[] args) {
        String str="ddfes gfdg fgref g";
        String[] strings = str.split("g");
        for (int i = 0; i < strings.length; i++) {
            if(strings[i]!=null){
                System.out.println(strings[i]);
            }

        }

    }
}
